package com.lgit.model2.hw03;


import org.jetbrains.annotations.NotNull;

public class CallType extends PhoneCard implements TalkSrevice{
    private int callTime;   // 通话时长
    private int mesCnt;     // 短信条数
    private double price;   // 每月资费

    public CallType() {
    }

    public CallType(String cType, String cNum, String userName, String userPass, double money, int callTime, int flow, int callTime1, int mesCnt, double price) {
        super(cType, cNum, userName, userPass, money, callTime, flow);
        this.callTime = callTime1;
        this.mesCnt = mesCnt;
        this.price = price;
    }

    @Override
    public int getCallTime() {
        return callTime;
    }

    @Override
    public void setCallTime(int callTime) {
        this.callTime = callTime;
    }

    public int getMesCnt() {
        return mesCnt;
    }

    public void setMesCnt(int mesCnt) {
        this.mesCnt = mesCnt;
    }

    public double getPrice() {
        return price;
    }

    public void setPrice(double price) {
        this.price = price;
    }

    @Override
    public void show() {
        super.show();
        System.out.println("通话时长为:" + getCallTime() + ", 短信条数为:" + getMesCnt() + ", 每月资费为:" + getPrice());
    }


    @Override
    public void talkService(int calltime, @NotNull PhoneCard pc) {
        System.out.println(pc.getUserName() + "本月通话时长为:" + calltime);
    }
}
